/*
* CourseDao.java
* Created on  2014-4-19 下午5:13
* 版本       修改时间          作者      修改内容
* V1.0.1    2014-4-19       gaoxinyu    初始版本
*
*/
package com.genghis.ptas.course.dao;

import com.genghis.core.page.entity.Page;
import com.genghis.core.page.entity.PageParameter;
import com.genghis.ptas.course.entity.ChapterInfo;
import com.genghis.ptas.course.entity.CourseComment;
import com.genghis.ptas.course.entity.CourseInfo;
import com.genghis.ptas.course.entity.CourseRegister;
import com.genghis.ptas.security.entity.User;

import java.util.List;

/**
 * 类的描述信息
 *
 * @author gaoxinyu
 * @version 1.0.1
 */
public interface CourseDao {

    Page<CourseInfo> findCoursePageList(PageParameter pageParameter, CourseInfo courseInfo);

    int addCourse(CourseInfo courseInfo);

    int addChapter(ChapterInfo chapterInfo);

    void editCourse(CourseInfo courseInfo);

    List<ChapterInfo> findChapterByCourseId(Integer id);

    CourseInfo findCourseByCourseId(Integer id);

    void deleteCourseInfoById(Integer id);

    void changeAuditState(CourseInfo courseInfo);

    List<CourseInfo> findCourseList(int userId);

    int addCourseComment(CourseComment courseComment);

    List<CourseComment> findCourseCommentByCourseId(Integer id);

    List<CourseInfo> findCourseListByTypeIdAndName(Integer typeId, String searchName);

    List<CourseInfo> findCourseListByCourseName(String courseName);

    List<CourseInfo> findUploadCourseListByUserId(Integer userId);

    List<CourseInfo> findTopCollectCourse(int userId);

    List<CourseInfo> findTopRegisterCourse(int userId);

    List<CourseRegister> findRegisterThisMonth(User user);
}
